#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2021/8/3 14:58
# @Author  : Samge
from PyQt5 import QtCore
from PyQt5.QtGui import QDesktopServices
from itkz.resources.utils import common_util, tip_util


def open_url(self, url):
    """
    在浏览器中打开链接
    :param self:
    :param url:
    :return:
    """
    if not url or not str(url).startswith('http'):
        return
    common_util.copy_text(url)
    if str(url).startswith('http'):
        QDesktopServices.openUrl(QtCore.QUrl(url))
